package wtools

func SliceUnique[T comparable](slice []T) []T {
	result := make([]T, 0)
	mapInt := make(map[T]bool)

	for _, v := range slice {
		if _, ok := mapInt[v]; !ok {
			result = append(result, v)
			mapInt[v] = true
		}
	}
	return result
}
